package com.littcore.saap.assistant.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.io.Serializable;

/**
 * <br>
 * Table:user_portlet<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since Oct 21, 2015 5:50:01 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "user_portlet")
public class UserPortlet implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Integer id;

	/**
	 * 小组件UID.
	 */
	private String portletUid;

	/**
	 * 用户ID.
	 */
	private int userId;

	/**
	 * 名称.
	 */
	private String name;

	/**
	 * 位置X.
	 */
	private int positionX;

	/**
	 * 位置Y.
	 */
	private int positionY;

	/**
	 * 主题.
	 */
	private String theme;

	/**
	 * 刷新周期.
	 */
	private int refreshInterval;

	/**
	 * 动态参数.
	 */
	private String params;

	/**
	 * 创建时间.
	 */
	private Date createDatetime;

	public UserPortlet() {
	}

	public UserPortlet(String portletUid, int userId, String name,
			int positionX, int positionY, String theme, int refreshInterval,
			Date createDatetime) {
		this.portletUid = portletUid;
		this.userId = userId;
		this.name = name;
		this.positionX = positionX;
		this.positionY = positionY;
		this.theme = theme;
		this.refreshInterval = refreshInterval;
		this.createDatetime = createDatetime;
	}

	public UserPortlet(String portletUid, int userId, String name,
			int positionX, int positionY, String theme, int refreshInterval,
			String params, Date createDatetime) {
		this.portletUid = portletUid;
		this.userId = userId;
		this.name = name;
		this.positionX = positionX;
		this.positionY = positionY;
		this.theme = theme;
		this.refreshInterval = refreshInterval;
		this.params = params;
		this.createDatetime = createDatetime;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**  
	 * Get 小组件UID.
	 * @return 小组件UID
	 */

	@Column(name = "PORTLET_UID", nullable = false, length = 50)
	public String getPortletUid() {
		return this.portletUid;
	}

	/**
	 * Set 小组件UID.
	 * @param portletUid 小组件UID
	 */
	public void setPortletUid(String portletUid) {
		this.portletUid = portletUid;
	}

	/**  
	 * Get 用户ID.
	 * @return 用户ID
	 */

	@Column(name = "USER_ID", nullable = false)
	public int getUserId() {
		return this.userId;
	}

	/**
	 * Set 用户ID.
	 * @param userId 用户ID
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}

	/**  
	 * Get 名称.
	 * @return 名称
	 */

	@Column(name = "NAME", nullable = false, length = 50)
	public String getName() {
		return this.name;
	}

	/**
	 * Set 名称.
	 * @param name 名称
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**  
	 * Get 位置X.
	 * @return 位置X
	 */

	@Column(name = "POSITION_X", nullable = false)
	public int getPositionX() {
		return this.positionX;
	}

	/**
	 * Set 位置X.
	 * @param positionX 位置X
	 */
	public void setPositionX(int positionX) {
		this.positionX = positionX;
	}

	/**  
	 * Get 位置Y.
	 * @return 位置Y
	 */

	@Column(name = "POSITION_Y", nullable = false)
	public int getPositionY() {
		return this.positionY;
	}

	/**
	 * Set 位置Y.
	 * @param positionY 位置Y
	 */
	public void setPositionY(int positionY) {
		this.positionY = positionY;
	}

	/**  
	 * Get 主题.
	 * @return 主题
	 */

	@Column(name = "THEME", nullable = false, length = 50)
	public String getTheme() {
		return this.theme;
	}

	/**
	 * Set 主题.
	 * @param theme 主题
	 */
	public void setTheme(String theme) {
		this.theme = theme;
	}

	/**  
	 * Get 刷新周期.
	 * @return 刷新周期
	 */

	@Column(name = "REFRESH_INTERVAL", nullable = false)
	public int getRefreshInterval() {
		return this.refreshInterval;
	}

	/**
	 * Set 刷新周期.
	 * @param refreshInterval 刷新周期
	 */
	public void setRefreshInterval(int refreshInterval) {
		this.refreshInterval = refreshInterval;
	}

	/**  
	 * Get 动态参数.
	 * @return 动态参数
	 */

	@Column(name = "PARAMS", length = 4000)
	public String getParams() {
		return this.params;
	}

	/**
	 * Set 动态参数.
	 * @param params 动态参数
	 */
	public void setParams(String params) {
		this.params = params;
	}

	/**  
	 * Get 创建时间.
	 * @return 创建时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATETIME", nullable = false, length = 19)
	public Date getCreateDatetime() {
		return this.createDatetime;
	}

	/**
	 * Set 创建时间.
	 * @param createDatetime 创建时间
	 */
	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

}
